Skip to content

fix(update): use consistent diff engine for patch-ID matching#124

Merged
narnaud merged 1 commit intomainfrom
fix-update2
Mar 22, 2026
Merged

fix(update): use consistent diff engine for patch-ID matching#124
narnaud merged 1 commit intomainfrom
fix-update2

Conversation

@narnaud
Copy link
Owner

@narnaud narnaud commented Mar 22, 2026

collect_patch_ids used git log -p for upstream commits while
batch_patch_ids used git diff-tree -p for feature commits. These
produce different patch-IDs when diff.algorithm is set (e.g. histogram),
because diff-tree ignores the config and always uses Myers. Switch
collect_patch_ids to rev-list + diff-tree so both sides use the same
engine. Add --empty=drop as a safety net for any commits that slip
through filtering. Add integration tests that reproduce the bug by
setting diff.algorithm=histogram with a markdown file rewrite.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

collect_patch_ids used `git log -p` for upstream commits while
batch_patch_ids used `git diff-tree -p` for feature commits. These
produce different patch-IDs when diff.algorithm is set (e.g. histogram),
because diff-tree ignores the config and always uses Myers. Switch
collect_patch_ids to rev-list + diff-tree so both sides use the same
engine. Add --empty=drop as a safety net for any commits that slip
through filtering. Add integration tests that reproduce the bug by
setting diff.algorithm=histogram with a markdown file rewrite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@narnaud narnaud merged commit e98d4f2 into main Mar 22, 2026
4 checks passed
@narnaud narnaud deleted the fix-update2 branch March 22, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant